<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="layout.xhtml">
        <ui:define name="body">

            <h:form id="userForm" enctype="multipart/form-data">
                <h1 class="title">Usuario</h1>
                <p:growl id="messages" showDetail="true" autoUpdate="true"  /> 
                <div class="row">
                    <div class="twelve columns"> 
                        <fieldset>
                            <legend> <h4 style="margin:0 0 10px 0">Cadastro</h4></legend>
                            <p:panel id="userPanel" style="background: none; border: none;" 
                                     styleClass="container_24 clearfix ">

                                <p:outputLabel value="Nome : " styleClass="grid_3"/>
                                <p:inputText styleClass="grid_20" value="#{managerSearchUser.user.name}" />

                                <p:outputLabel value="Email : " styleClass="grid_3"/>
                                <p:inputText styleClass="grid_20" value="#{managerSearchUser.user.email}" />
                            </p:panel>
                        </fieldset>
                        <br/>
                        <fieldset>
                            <legend> <h4 style="margin:0 0 10px 0">Login</h4></legend>
                            <p:panel id="loginPanel" style="background: none; border: none;" 
                                     styleClass="container_24 clearfix ">
                                <p:outputLabel value="Login : " styleClass="grid_3"/>
                                <p:inputText styleClass="grid_6" value="#{managerSearchUser.user.login}" />
                                <div class="clear"/>
                                <p:outputLabel value="Senha Atual : " styleClass="grid_3"/>
                                <p:password  styleClass="grid_6" value="#{managerSearchUser.passwordOld}" />
                                <div class="clear"/>
                                <p:outputLabel value="Senha Nova : " styleClass="grid_3"/>
                                <p:password  styleClass="grid_6" value="#{managerSearchUser.passwordNew}" />
                                <div class="clear"/>
                                <p:outputLabel value="Confirmar : " styleClass="grid_3"/>
                                <p:password  styleClass="grid_6" value="#{managerSearchUser.confirm}" />


                            </p:panel>

                        </fieldset>

                        <br/>
                        <div class="buttonAction">
                            <p:commandButton value="Salvar" icon="ui-icon-disk"
                                             update="@form"
                                             actionListener="#{managerSearchUser.update()}"
                                             styleClass="ui-priority-primary" />
                            <p:button href="searchUser.xhtml" value="Cancelar"  icon="ui-icon-trash" />
                        </div >
                    </div>
                </div>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
